/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package shoppinglist;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
 *
 * @author Student
 */
 class ButtonListener implements ActionListener{
    private final ButtonPanel outer;

     ButtonListener(final ButtonPanel outer){
        super();
        this.outer = outer;
    }
    
    @Override
    public void actionPerformed(ActionEvent ae) {
      outer.controller.handleEvent(ae.getActionCommand());
    }
}
